<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ include file="../../common/taglib.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>详细</title>
    <link type="text/css" rel="stylesheet" href="/css/main.css"/>
    <link type="text/css" rel="stylesheet" href="/css/skin.css"/>
    <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
</head>
<body>

<div id="layout">
    <!-- head start -->
    <%@ include file="decorators/head.jsp"%>
    <!-- head end -->

    <!-- main start -->
    <div id="main">
        <div id="main_nav"><a href="/">首页</a> >>  详细 </div>
        <div id="main_right">
            <h1>海淘</h1>
            <div class="hr" style="width:200px;"></div>
            <ul>
                <li><a href="#"><img src="/image/brand/locklock.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/maibaobao.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/baili.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/meiji.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/dove.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/jackjones.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/daphne.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/miracle.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/bencao.png" alt=""></a></li>
                <li><a href="#"><img src="/image/brand/wenger.png" alt=""></a></li>
            </ul>
        </div>

        <div id="main_left">
            <h1>${actionBean.product.name}</h1>
            <div class="hr"></div>
            <div id="detail">
                <h2><span>时间 : <fmt:formatDate value="${actionBean.product.starttime}" pattern="MM-dd HH:mm"/></span>分类：${actionBean.product.categorys}</h2>
                <div class="detail_img">
                    <img src="${actionBean.product.picurl}" class="autoImg">
                    <span><a href="${actionBean.product.link}">直达链接</a><b class="right" style="margin-right:10px;">${actionBean.product.fromwhere}</b></span>
                </div>
                <p>
                    ${actionBean.product.detail}
                </p>
            </div>
        </div>
    </div>
    <!-- main end -->

    <!-- foot start -->
    <%@ include file="decorators/foot.jsp"%>
    <!-- foot end -->

</div>
</body>
</html>
<script type="text/javascript">
    function setImg(img,width,height){
        var scale_w=img.width/width;
        var scale_h=img.height/height;
        var scale=scale_w>scale_h?scale_w:scale_h;
        img.width=img.width/scale;
        return false;
    }
    $(document).ready(function(){
        $(".autoImg").each(function(){
            setImg(this,200,200);
        });
    });
</script>